package com.xianrenit.xianrenpuzi.order.client;

import com.xianrenit.xianrenpuzi.model.entity.order.OrderInfo;
import com.xianrenit.xianrenpuzi.model.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "service-order")
public interface OrderClient {
    @Operation(summary = "根据订单id查询订单")
    @GetMapping("/api/order/orderInfo/auth/{id}")
    public Result<OrderInfo> getOrderById(@PathVariable("id")Long id);
    @Operation(summary = "支付成功更新订单支付信息")
    @PutMapping("/api/order/orderInfo/auth/updateOrderInfo/{orderNo}")
    public Result updateOrderInfo(@PathVariable("orderNo")String orderNo);
    @Operation(summary = "根据订单编号查询订单")
    @GetMapping("/api/order/orderInfo/auth/getOrderByNo/{orderNo}")
    public Result<OrderInfo> getOrderByNo(@PathVariable("orderNo")Long orderNo);
}
